# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=umit
pkgver=1.0
pkgrel=9
pkgdesc='A powerful nmap frontend.'
arch=('any')
url='http://www.umitproject.org/'
groups=('blackarch' 'blackarch-networking')
license=('GPL')
depends=('python2' 'pygtk' 'nmap' 'python2-pysqlite')
source=("http://downloads.sourceforge.net/umit/$pkgname-$pkgver.tar.bz2"
        'setup.patch'
        "$pkgname.desktop")
sha512sums=('179edcae4219630aae68c23da3c979d1d356b4882875354445c2d217407842abaaecbc91b1a676a3da0bed256a5d82a320538058675dd78aa6bc3d3c037f7d36'
            'a8bf6adcc3552ca7ea1040afb52613dab050cea61b4be01ff9091cee2c4ff4f8ae5ef4e3d22e1f71adcf27f746182c271eb8a4648c5786364e5c59708cd3deaa'
            '33c0416c336b867226c328f191e8e8bea6e9d1a8f53d76b7f7a26de29e75d1a48e8bb9c6d7465795900619ee56129d5a966f79a9910c1de4c08843a78ad73b8f')

build() {
  cd "$pkgname-$pkgver"

  patch -p0 < $srcdir/setup.patch
}

package() {
  cd "$pkgname-$pkgver"

  install -Dm 644 "$srcdir/$pkgname.desktop" \
    "$pkgdir/usr/share/applications/$pkgname.desktop"

  python2 setup.py install --root="$pkgdir" --install-lib=usr/share/umit -O1
}

